<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"> 

<ui:composition template="/_template.xhtml">
	<ui:define name="corpo">


		<div id="conteudo">
			<h:form id="form">

				<h2>
					<h:outputText value="Esqueci Minha Senha" />
				</h2>
				
				<p:messages id="msg"/>

				<p:fieldset legend="Dados do Funcionario" style="background-image: url(resources/imagens/9.jpg);"><br />
														
					<h4>
						<h:outputText value="Qual sua matrícula?" />
					</h4><br />
					
					<p:inputText id="matricula" value="#{loginBean.funcionarioL.matricula}" required="true" requiredMessage="Preencha a sua matricula"> 
						<f:ajax event="change" />
					</p:inputText><br />
					
					<h4>
						<h:outputText value="Qual é sua palavra secreta?" />
					</h4><br />
					<p:password id="secret" value="#{loginBean.funcionarioL.campo_secreto}" feedback="false" required="true" requiredMessage="Qual a sua palavra secreta?"> 
						<f:ajax event="change" />
					</p:password>
					<br /><br />

					<p:commandButton value="Enviar" action="#{loginBean.esqueciSenha}" ajax="false" image="ui-icon-arrowreturnthick-1-e" 
						style="margin-left: -5px;">
						<f:ajax execute="true" render="@form" />
					</p:commandButton> 
										
					<p:commandButton value="Cancelar" onclick="dlgVolta.show();" image="ui-icon-close" style="margin-left: 30px;" />
					
					</p:fieldset>		
				
			</h:form>

			<p:dialog header="Cancelar Solicitação?" modal="true" showEffect="hide" hideEffect="size" widgetVar="dlgVolta" resizable="false">
				<h:form>
					<h:panelGrid columns="2" id="display">
						<p:commandButton value="SIM" action="index.xhtml?faces-redirect=true" />
						<p:commandButton value="NAO" action="EsqueciMinhaSenha.xhtml?faces-redirect=true" />
					</h:panelGrid>
				</h:form>
			</p:dialog>

		</div>

	</ui:define>
</ui:composition>

</html>
